package com.cskaoyan.controller.goods;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.bo.goods.AdminCommentDeleteBO;
import com.cskaoyan.bean.bo.goods.AdminCommentListBO;
import com.cskaoyan.bean.vo.goods.AdminCommentListVO;
import com.cskaoyan.service.goods.AdminCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/20 16:34
 */
@RestController
@RequestMapping("admin/comment")
public class AdminCommentController {

    @Autowired
    AdminCommentService adminCommentService;

    @GetMapping("list")
    public BaseRespVo printCommentList(AdminCommentListBO adminCommentListBO) {
        AdminCommentListVO adminCommentListVO = adminCommentService.printCommentList(adminCommentListBO);
        return BaseRespVo.ok(adminCommentListVO);
    }

    @PostMapping("delete")
    public BaseRespVo deleteComment(@RequestBody AdminCommentDeleteBO adminCommentDeleteBO) {
        adminCommentService.deleteComment(adminCommentDeleteBO);
        return BaseRespVo.ok();
    }
}
